package cn.wolfcode.trip.app.web.controller;
import cn.wolfcode.trip.base.service.IPageViewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * 游记浏览量管理器
 */
@RestController
@RequestMapping("/pageviews")
public class PageViewController {
    @Autowired
    private IPageViewService pageViewService;
    /**
     * 查询游记浏览量
     * 资源:/pageviews/{travelId}
     * 动作:GET
     * 参数:{travelId}
     */
    @GetMapping("/{travelId}")
    public Object getTravelView(@PathVariable Long travelId){

        return pageViewService.travelview(travelId);
    }
}
